Welcome to Pre-trained Models: Text-to-Image Generation. After watching this video, you'll be able to explore the
different models used for text-to-image generation
in generative AI. You will also be
able to describe the uses and benefits
of these models. Text-to-image
generation models are a type of machine
learning model. They are used to generate
images from text descriptions. They use generative AI
to make meaning out of your words and turn
them into unique images. Text-to-image
generation models are trained on a large data set of text and images
and can be used to generate various
types of images. These can be realistic images, abstract images, or even images that do not exist
in the real world. There are two types of
text-to-image generation models, generative adversarial networks, also called GANs, and
diffusion models. Let's look at each. GANs are a type of
machine-learning model that can be used to
generate realistic images. They work by training two
models against each other. A generator model that
generates images, and a discriminator model that distinguishes between
real and fake images. The generator model is gradually
improved over time until it can generate images that are indistinguishable
from real images. Diffusion models are also a type of machine
learning model. They are used to generate
images from text descriptions. They work by starting with a
random image and gradually adding detail to the image until it matches the
text description. Diffusion models are typically more efficient than GANs and can be used to generate more creative and
abstract images. Let's explore the most popular text-to-image generation
diffusion models, DALL-E and Imagen. DALL-E is a text-to-image
generation model developed by OpenAI. DALL-E is trained on a massive data set of
texts and images, and can be used to generate realistic images from
various text descriptions. It also incorporates an
evaluation mechanism to determine whether the
final picture is accurate. To achieve this, DALL-E uses a combination of
its core elements, natural language
processing, also known as NLP, machine learning, and computer vision,
for example, it can take a
simple description, like a panda juggling a ball, and turn it into a
photo-realistic image that hasn't been created before. Not only that, but DALL-E can also edit photographs based on a simple text description
such that the edit blends in seamlessly with the original image. It's
called inpainting. DALL-E is special because
deep learning allows it to understand individual objects
such as pandas and balls, and how things are related. The latest version of
DALL-E is a large model, but not nearly as large as GPT-3 and interestingly, smaller
than its predecessor. Despite its size, this
newer version generates four times better
resolution images than the former
version of DALL-E. So, what are the benefits of DALL-E? An image generated
by DALL-E tells us if the system understands
what we've communicated, or merely repeats what
it has been taught. Further, DALL-E plays a
crucial role in developing useful and safe AI
by enabling us to understand how AI makes
sense of our world. The second popular
model is Imagen. Imagen is a text to image generation model
developed by Google AI. Just like DALL-E, Imagen is also trained on a massive data
set of text and images. Imagen is used to generate realistic images from a wide variety of
text descriptions. Imagen leverages the power of large transformer models and deep language understanding to generate high-fidelity images. An important discovery has been that large language models, like T-5 pre-trained on text, are pretty effective at encoding text to
generate images. Hence, it would follow that increasing the language model size
in Imagen would also augment image
fidelity rather than increasing the size of the
image diffusion model. Imagen claims to
be able to produce an unprecedented degree
of photorealism, which is one of its
key advantages. This is how it works,
the model picks up texts such as "two white umbrellas
rising into the sky. Clouds are moving,
it is raining," and converts it into an
image depicting just that. The image could be either photo realistic or an artistic
interpretation. In this video, you learned how text-to-image
generation models work. These models are
classified into two types, GANs and diffusion models. Within diffusion
models, you explored the most popular text to image generation models,
DALL-E and Imagen. Finally, you learned
the benefits of each of these models.